package com.trendytech.tds.entity;

public class SystemThresholdEntity extends AbstractEntity {

	private static final long serialVersionUID = 8893437237539183036L;
	
	private int type;
	private int val;
	private int status;
	private int importance;
	/**
	 * 用户Id
	 */
	private String creator;
	private String username;

	public SystemThresholdEntity() {
	}

	public SystemThresholdEntity(int type, int val, int status, int importance, String creator) {
		super();
		this.type = type;
		this.val = val;
		this.status = status;
		this.importance = importance;
		this.creator = creator;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getVal() {
		return val;
	}

	public void setVal(int val) {
		this.val = val;
	}
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public int getImportance() {
		return importance;
	}



	public void setImportance(int importance) {
		this.importance = importance;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((creator == null) ? 0 : creator.hashCode());
		result = prime * result + importance;
		result = prime * result + status;
		result = prime * result + type;
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		long temp;
		temp = Double.doubleToLongBits(val);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SystemThresholdEntity other = (SystemThresholdEntity) obj;
		if (creator == null) {
			if (other.creator != null)
				return false;
		} else if (!creator.equals(other.creator))
			return false;
		if (importance != other.importance)
			return false;
		if (status != other.status)
			return false;
		if (type != other.type)
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		if (Double.doubleToLongBits(val) != Double.doubleToLongBits(other.val))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "SystemThresholdEntity [type=" + type + ", val=" + val + ", status=" + status + ", importance="
				+ importance + ", creator=" + creator + ", username=" + username + "]";
	}


}
